设备管理API
获取设备列表
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| page_size | Integer | Body | 是 | 每页数量 |
| page_index | Integer | Body | 是 | 当前页数 |
| residence_id | String | Body | 否 | 住宅ID |
| sub_device_type | []String | Body | 否 | 子设备类型 |
| show_ability | Boolean | Body | 否 | 判断是否展示设备能力 true:展示 false:隐藏 当有住宅ID时有效 |
| parallel_sub_device | Boolean | Body | 否 | 判断是否展开子设备信息 true:展开 false:嵌套 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_id | String | Body | 设备ID |
| device_name | String | Body | 设备名称 |
| product_name | String | Body | 产品名称 |
| device_type | String | Body | 设备类型 |
| device_picture_url | String | Body | 设备图片地址 |
| online | Boolean | Body | 判断设备在离线状态 true:在线 false:离线 |
| abilities | []Object<ability> | Body | 能力信息 |
| space | Object<space> | Body | 空间信息 |
| sub_devices | []Object<result> | Body | 子设备信息 |
| parent_device_id | String | Body | 父设备ID |
ability说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| ability_id | String | Body | 能力ID |
| ability_name | String | Body | 能力名称 |
| ability_type | String | Body | 能力类型,见 标准物模型 |
| ability_attribute | []String | Body | 能力所含附加属性,见 标准物模型 |
| state | String | Body | 状态,见 标准物模型 |
| attribute | Object | Body | 附加属性,见 标准物模型 |
space说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| space_id | String | Body | 空间ID |
| space_name | String | Body | 空间名称 |
| parent_space_id | String | Body | 父空间ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_device_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"show_ability": true,
"parallel_sub_device": false
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"device_name": "My Device",
"product_name": "HyPanel",
"device_type": "PS51",
"device_picture_url": "https://test.akubela.com/g.png",
"online": true,
"abilities": [
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cv",
"ability_name": "led1",
"ability_type": "light",
"ability_attribute": [
"brightness"
],
"state": "on",
"attribute": {
"brightness": 70
}
},
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cb",
"ability_name": "led2",
"ability_type": "light",
"ability_attribute": [],
"state": "off",
"attribute": {}
}
],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"sub_devices": [
{
"device_id": "d8b5a73f8dd84abaa94b1c288be49b0cf",
"device_name": "My Sub Device",
"product_name": "Motion Sensor",
"device_type": "Motion Sensor",
"device_picture_url": "https://test.akubela.com/o.png",
"abilities": [],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"online": true,
"parent_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx"
}
],
"parent_device_id": ""
}
]
}
失败返回示例
见 接口失败返回
获取设备信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_id | String | Body | 设备ID |
| device_name | String | Body | 设备名称 |
| product_name | String | Body | 产品名称 |
| device_type | String | Body | 设备类型 |
| device_picture_url | String | Body | 设备图片地址 |
| online | Boolean | Body | 判断设备在离线状态 true:在线 false:离线 |
| abilities | []Object<ability> | Body | 能力信息 |
| space | Object<space> | Body | 空间信息 |
| sub_devices | []Object<result> | Body | 子设备信息 |
ability说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| ability_id | String | Body | 能力ID |
| ability_name | String | Body | 能力名称 |
| ability_type | String | Body | 能力类型,见 标准物模型 |
| ability_attribute | []String | Body | 能力所含附加属性,见 标准物模型 |
| state | String | Body | 状态,见 标准物模型 |
| attribute | Object | Body | 附加属性,见 标准物模型 |
space说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| space_id | String | Body | 空间ID |
| space_name | String | Body | 空间名称 |
| parent_space_id | String | Body | 父空间ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"device_name": "My Device",
"product_name": "HyPanel",
"device_type": "PS51",
"device_picture_url": "https://test.akubela.com/g.png",
"online": true,
"abilities": [
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cv",
"ability_name": "led1",
"ability_type": "light",
"ability_attribute": [
"brightness"
],
"state": "on",
"attribute": {
"brightness": 70
}
},
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cb",
"ability_name": "led2",
"ability_type": "light",
"ability_attribute": [],
"state": "off",
"attribute": {}
}
],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"sub_devices": [
{
"device_id": "d8b5a73f8dd84abaa94b1c288be49b0cf",
"device_name": "My Sub Device",
"product_name": "Motion Sensor",
"device_type": "Motion Sensor",
"device_picture_url": "https://test.akubela.com/o.png",
"abilities": [],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"online": true
}
]
}
]
}
失败返回示例
见 接口失败返回
控制设备
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| ability_id | String | Body | 是 | 能力ID |
| control | String | Body | 是 | 能力控制,见 标准物模型 |
| attribute | Object | Body | 否 | 附加属性,见 标准物模型 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "control_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"ability_id": "e8b5a73f8dd84abaa94dcs288be49b4ce",
"control": "turn_on",
"attribute": {
"brightness": 70
}
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量控制设备
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| devices | []Object<device> | Body | 是 | 设备信息 |
device说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| ability_id | String | Body | 是 | 能力ID |
| control | String | Body | 是 | 能力控制,见 标准物模型 |
| attribute | Object | Body | 否 | 附加属性,见 标准物模型 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_control_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"devices": [
{
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"ability_id": "e8b5a73f8dd84abaa94dcs288be49b4ce",
"control": "turn_on",
"attribute": {
"brightness": 70
}
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量控制设备组
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| spaces | []Object<space> | Body | 是 | 空间信息 |
| devices | []Object<device> | Body | 是 | 设备信息 |
space说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| space_id | String | Body | 是 | 空间ID |
device说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| ability_type | String | Body | 是 | 能力类型,见 标准物模型 |
| control | String | Body | 是 | 能力控制,见 标准物模型 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_control_device_group",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"spaces": [
{
"space_id": "r8b5a73f8dd84abaa94dcs248be49b0d2"
}
],
"devices": [
{
"ability_type": "light",
"control": "turn_on"
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
更新设备信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| space_id | String | Body | 是 | 空间ID |
| device_name | String | Body | 是 | 设备名称 |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_name": "test_device_name",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3cbca664f4a10a0ce95452be1b67ca58",
"space_id": "rc3c6e408413be7fdc3e60f34f0950d6b"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量更新设备信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| devices | []Object<device> | Body | 是 | 设备信息 |
| residence_id | String | Body | 是 | 住宅ID |
device说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| space_id | String | Body | 是 | 空间ID |
| device_name | String | Body | 是 | 设备名称 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_update_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"devices": [
{
"device_id": "d2ab24943ba75edc0a77211e5084f95e0",
"space_id": "rcf986cb4c00d4a031a56a51a81e430d5",
"device_name": "test_device_name"
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
更新设备能力信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| ability_id | String | Body | 是 | 能力ID |
| ability_name | String | Body | 是 | 能力名称 |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_device_ability_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"ability_name": "test_name",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3cbca664f4a10a0ce95452be1b67ca58",
"ability_id": "ac3c6e408413be7fdc3e60f34f0950d6b"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量更新设备能力信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| devices | []Object<device> | Body | 是 | 设备信息 |
| residence_id | String | Body | 是 | 住宅ID |
device说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| ability_id | String | Body | 是 | 能力ID |
| ability_name | String | Body | 是 | 能力名称 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_update_device_ability_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"devices": [
{
"device_id": "d2ab24943ba75edc0a77211e5084f95e0",
"ability_id": "acf986cb4c00d4a031a56a51a81e430d5",
"ability_name": "test_name"
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取灯光控制群组信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_name | String | Body | 设备名称 |
| space_id | String | Body | 空间ID |
| control_group | Object<control_group> | Body | 控制群组 |
control_group说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| low_brightness_level_groups | []Object<brightness_level_group> | Body | 低亮度群组信息 |
| medium_brightness_level_groups | []Object<brightness_level_group> | Body | 中亮度群组信息 |
| high_brightness_level_groups | []Object<brightness_level_group> | Body | 高亮度群组信息 |
brightness_level_group说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_id | String | Body | 设备ID |
| ability_id | String | Body | 能力ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_light_control_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d11adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_name": "test",
"space_id": "rafa332e258aae1badbb27d31128f442d",
"control_group": {
"low_brightness_level_groups": [
{
"device_id": "dafa332e258aae1badbb27d31128f4421",
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0c1"
}
],
"medium_brightness_level_groups": [],
"high_brightness_level_groups": []
}
}
}
失败返回示例
见 接口失败返回
获取可组群控制灯光列表
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_id | String | Body | 设备ID |
| device_name | String | Body | 设备名称 |
| space_id | String | Body | 空间ID |
| space_name | String | Body | 空间名称 |
| abilities | []Object<ability> | Body | 能力信息 |
ability说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| ability_id | String | Body | 能力ID |
| ability_name | String | Body | 能力名称 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_groupable_control_light_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "dafa332e258aae1badbb27d31128f442d",
"device_name": "test_device",
"space_id": "r8b5a73f8dd84abaa94dcs248be49b0db",
"space_name": "my room",
"abilities": [
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cv",
"ability_name": "led1"
}
]
}
]
}
失败返回示例
见 接口失败返回
创建灯光控制群组信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_name | String | Body | 是 | 设备名称 |
| space_id | String | Body | 是 | 空间ID |
| control_group | Object<control_group> | Body | 是 | 控制群组 |
control_group说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| low_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 低亮度群组信息 |
| medium_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 中亮度群组信息 |
| high_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 高亮度群组信息 |
brightness_level_group说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| ability_id | String | Body | 是 | 能力ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_light_control_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_name": "test",
"space_id": "rafa332e258aae1badbb27d31128f442d",
"control_group": {
"low_brightness_level_groups": [
{
"device_id": "dafa332e258aae1badbb27d31128f4421",
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0c1"
}
],
"medium_brightness_level_groups": [],
"high_brightness_level_groups": []
}
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_id": "d8b5a73f8dd84abaa94dcs248be49b0d1"
}
}
失败返回示例
见 接口失败返回
更新灯光控制群组信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| device_name | String | Body | 是 | 设备名称 |
| space_id | String | Body | 是 | 空间ID |
| control_group | Object<control_group> | Body | 是 | 控制群组 |
control_group说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| low_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 低亮度群组信息 |
| medium_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 中亮度群组信息 |
| high_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 高亮度群组信息 |
brightness_level_group说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| ability_id | String | Body | 是 | 能力ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_light_control_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dafa332e258aae1badbb27d31128f5521",
"device_name": "test",
"space_id": "rafa332e258aae1badbb27d31128f442d",
"control_group": {
"low_brightness_level_groups": [
{
"device_id": "dafa332e258aae1badbb27d31128f4421",
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0c1"
}
],
"medium_brightness_level_groups": [],
"high_brightness_level_groups": []
}
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取锁基础配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| language | String | Body | 语言 |
| supported_language | []String | Body | 已支持语言 |
| volume | String | Body | 音量 high:高 medium:中 low:低 mute:静音 |
| dwell_alarm | Boolean | Body | 判断是否启用驻留警报 true:启用 false:禁用 |
| dwell_time | Integer | Body | 驻留时长,取值:15/20/25,单位:秒 |
| monitoring_scope | String | Body | 监控范围 large:大 small:小 |
| double_verification | Boolean | Body | 判断是否启用双重认证 true:启用 false:禁用 |
| wifi_ssid | String | Body | WiFi名称 |
| wifi_ip | String | Body | WiFi IP |
| wifi_gateway | String | Body | WiFi网关 |
| wifi_rssi | Integer | Body | WiFi信号强度 |
| lock_version | String | Body | 锁版本 |
| rtsp_url | String | Body | RTSP地址 |
| support_audio_intercom | Boolean | Body | 支持音频对讲 true: 支持 false: 不支持 |
| ciphertext | String | Body | 密文,依赖SDK解析 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_basic_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"language": "en",
"supported_language": [
"zh",
"en"
],
"volume": "high",
"dwell_alarm": true,
"dwell_time": 20,
"monitoring_scope": "large",
"double_verification": true,
"wifi_ssid": "akubela",
"wifi_ip": "192.168.19.190",
"wifi_gateway": "192.168.19.1",
"wifi_rssi": -30,
"rtsp_url": "rtsp://192.168.19.32",
"support_audio_intercom": true,
"ciphertext": "7b3d75f5a8cfa959167852468fca08a1",
"lock_version": ""
}
}
失败返回示例
见 接口失败返回
更新锁基础配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| residence_id | String | Body | 是 | 住宅ID |
| language | String | Body | 否 | 语言 |
| volume | String | Body | 否 | 音量 high:高 medium:中 low:低 mute:静音 |
| dwell_alarm | Boolean | Body | 否 | 判断是否启用驻留警报 true:启用 false:禁用 |
| dwell_time | Integer | Body | 否 | 驻留时长,取值:15/20/25,单位:秒 |
| monitoring_scope | String | Body | 否 | 监控范围 large:大 small:小 |
| double_verification | Boolean | Body | 否 | 判断是否启用双重认证 true:启用 false:禁用 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_lock_basic_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"language": "en",
"volume": "high",
"dwell_alarm": true,
"dwell_time": 20,
"monitoring_scope": "large",
"double_verification": true
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取锁临时密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| key_id | String | Body | 密码ID |
| key_name | String | Body | 密码名称 |
| temp_key | String | Body | 临时密码 |
| repeat_mode | String | Body | 重复模式 never:从不 weekly:每周 |
| available_days | []String | Body | 可用时间 |
| start_time | String | Body | 开始时间,UTC |
| finish_time | String | Body | 结束时间,UTC |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test",
"repeat_mode": "never",
"available_days": [],
"start_time": "2025-03-15 12:32:43",
"finish_time": "2025-03-15 17:32:43",
"temp_key": "01234567"
}
]
}
失败返回示例
见 接口失败返回
创建锁临时密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| key_name | String | Body | 是 | 密码名称 |
| temp_key | String | Body | 是 | 临时密码 |
| repeat_mode | String | Body | 是 | 重复模式 never:从不 weekly:每周 |
| available_days | []String | Body | 否 | 可用时间 |
| start_time | String | Body | 是 | 开始时间,UTC |
| finish_time | String | Body | 是 | 结束时间,UTC |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| key_id | String | Body | 密码ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_name": "test",
"temp_key": "01234567",
"repeat_mode": "weekly",
"available_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"start_time": "12:32:43",
"finish_time": "17:32:43",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
失败返回示例
见 接口失败返回
删除锁临时密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量删除锁临时密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| keys | []Object<key> | Body | 是 | 密码信息 |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
key说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取锁开门密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| key_id | String | Body | 密码ID |
| key_name | String | Body | 密码名称 |
| open_door_key | String | Body | 开门密码 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test",
"open_door_key": "123456"
}
]
}
失败返回示例
见 接口失败返回
创建锁开门密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| key_name | String | Body | 否 | 密码名称 |
| open_door_key | String | Body | 是 | 开门密码 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| key_id | String | Body | 密码ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"open_door_key": "123456",
"key_name": "test",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
失败返回示例
见 接口失败返回
更新锁开门密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| key_id | String | Body | 是 | 密码ID |
| key_name | String | Body | 是 | 密码名称 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
删除锁开门密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量删除锁开门密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| keys | []Object<key> | Body | 是 | 密码信息 |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
key说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取锁指纹配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| key_id | String | Body | 密码ID |
| key_name | String | Body | 密码名称 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test"
}
]
}
失败返回示例
见 接口失败返回
更新锁指纹配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| key_id | String | Body | 是 | 密码ID |
| key_name | String | Body | 是 | 密码名称 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
删除锁指纹配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量删除锁指纹配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| keys | []Object<key> | Body | 是 | 密码信息 |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
key说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
开启锁指纹配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_on_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
关闭锁指纹配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_off_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取锁卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| key_id | String | Body | 密码ID |
| key_name | String | Body | 密码名称 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test"
}
]
}
失败返回示例
见 接口失败返回
更新锁卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| key_id | String | Body | 是 | 密码ID |
| key_name | String | Body | 是 | 密码名称 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
删除锁卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量删除锁卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| keys | []Object<key> | Body | 是 | 密码信息 |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
key说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
开启锁卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_on_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
关闭锁卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_off_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取锁历史记录
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| page_size | Integer | Body | 是 | 每页数量 |
| page_index | Integer | Body | 是 | 当前页数 |
| lock_record_type | String | Body | 否 | 锁记录类型 unlock:开锁 alarm:警报 doorbell:门铃 capture:抓拍 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| lock_record_id | String | Body | 锁记录ID |
| lock_record_type | String | Body | 锁记录类型 unlock:开锁 alarm:警报 doorbell:门铃 capture:抓拍 |
| capture_picture_url | String | Body | 抓拍图地址 |
| lock_time | String | Body | 锁时间,UTC |
| note | String | Body | 记录 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_history",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"device_id": "d1b5a73f8dd84abaa94dcs248be49b0db",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"lock_record_id": "r1b5a73f8dd84abaa94dcs248be49b0d1",
"lock_type": "unlock",
"capture_picture_url": "",
"lock_time": "2025-02-16 13:32:43",
"note": ""
}
]
}
失败返回示例
见 接口失败返回
锁唤醒
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| residence_id | String | Body | 是 | 住宅ID |
| wakeup_mode | String | Body | 否 | 唤醒模式 sip:SIP(默认) bluetooth:蓝牙 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "lock_wakeup",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取设备历史记录
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| page_size | Integer | Body | 是 | 每页数量 |
| page_index | Integer | Body | 是 | 当前页数 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_id | String | Body | 设备ID |
| device_name | String | Body | 设备名称 |
| building_id | String | Body | 楼栋ID |
| building_name | String | Body | 楼栋名称 |
| floor_id | String | Body | 楼层ID |
| floor_name | String | Body | 楼层名称 |
| residence_id | String | Body | 住宅ID |
| residence_no | String | Body | 住宅号码 |
| mac | String | Body | MAC地址 |
| device_type | String | Body | 设备类型 |
| log_type | String | Body | 日志类型 |
| event_type | String | Body | 事件类型 |
| source | String | Body | 来源 |
| created_time | String | Body | 创建时间,UTC |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_device_history",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"device_name": "test",
"residence_id": "r2c4b070cc928496198944858b344fc68",
"residence_no": "101",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01",
"floor_id": "f1a621c1ae77040d697bd2134700f57ee",
"floor_name": "22",
"mac": "C10519082080",
"device_type": "climate",
"log_type": "send",
"event_type": "turn_all_on",
"source": "welcome",
"created_time": "2025-02-19 17:02:23"
}
]
}
失败返回示例
见 接口失败返回
获取门禁设备列表
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object | Body | 是 | 命令参数 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_id | String | Body | 设备ID |
| device_name | String | Body | 设备名称 |
| building_name | String | Body | 楼栋名称 |
| floor | String | Body | 楼层 |
| residence_no | String | Body | 住宅号码 |
| mac | String | Body | MAC地址 |
| online | Boolean | Body | 判断设备在离线状态 true:在线 false:离线 |
| device_type | String | Body | 判断设备类型 Multi-tenants Doorphone:梯口机 Single-tenant Doorphone:门口机 Access Control:门禁 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_access_device_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"device_name": "test",
"residence_no": "101",
"building_name": "AB01",
"floor": "22",
"online": true,
"device_type": "Multi-tenants Doorphone",
"mac": "C10519082089"
}
]
}
失败返回示例
见 接口失败返回
获取门禁设备信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_name | String | Body | 设备名称 |
| building_name | String | Body | 楼栋名称 |
| floor | String | Body | 楼层 |
| residence_no | String | Body | 住宅号码 |
| mac | String | Body | MAC地址 |
| online | Boolean | Body | 判断设备在离线状态 true:在线 false:离线 |
| device_type | String | Body | 判断设备类型 Multi-tenants Doorphone:梯口机 Single-tenant Doorphone:门口机 Access Control:门禁 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_access_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_name": "test",
"residence_no": "101",
"building_name": "AB01",
"floor": "22",
"online": true,
"device_type": "Multi-tenants Doorphone",
"mac": "C10519082089"
}
}
失败返回示例
见 接口失败返回